package org.dinnermate.log;

public class Level
{
	public static Level SEVERE = new Level("SEVERE", 1);
	public static Level WARNING = new Level("WARNING", 2);
	public static Level INFO = new Level("INFO", 3);
	public static Level FINE = new Level("FINE", 4);
	
	private String name;
	private int value;
	
	protected Level(String name, int value)
	{
		this.value = value;
	}
	
	public int getIntLevel()
	{
		return value;
	}
	
	public String getName()
	{
		return name;
	}
	
	public boolean equals(Object ox) {
        try {
            Level lx = (Level)ox;
            return (lx.value == this.value);
        } catch (Exception ex) {
            return false;
        }
    }
}
